﻿using Microsoft.SPOT;

using GT = Gadgeteer;
using Gadgeteer.Modules.DFRobot;

namespace UV_Test
{
    public partial class Program
    {
        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            Debug.Print("Program Started");

            GT.Timer timer = new GT.Timer(1000);
            timer.Tick += new GT.Timer.TickEventHandler(timer_Tick);
            timer.Start();
        }

        void timer_Tick(GT.Timer timer)
        {
            Debug.Print(uV_Sensor.ReadUVSensorVoltage() + " volts");
            Debug.Print(uV_Sensor.GetUVI().ToString() + " UV Index");
        }
    }
}
